home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 240 (DVD) / Issue 240 - February 2008 - DPCS0208DVD.ISO / Extras / NetObjects Fusion / NOF10.exe / data1.cab / FSI / Update / lib / nof / update / UpdateOptions.js < prev    next >
Encoding:
Text File  |  2007-04-11  |  3.0 KB  |  127 lines

  1. /****i* SOURCE_FILE/INFO
  2.     *
  3.     * NAME
  4.     *  UpdateOptions.js
  5.     *
  6.     * USAGE
  7.     *  Part of Netobjects JavaScript Library.
  8.     *
  9.     * COPYRIGHT
  10.     *  Copyright ⌐ 2000-2005 Website Pros, Inc.
  11.     *  All Rights Reserved.
  12.     *
  13.     *  This is an unpublished work protected by Website Pros, Inc.
  14.     *  as a trade secret, and is not to be used or disclosed except as
  15.     *  expressly provided in a written license agreement executed by
  16.     *  you and Website Pros, Inc.
  17.     *
  18.     *      <copyright@websitepros.com>
  19.     *
  20.     * NOTES
  21.     *  JavaScript code.
  22.     *
  23.     *****/
  24. if (!IS.isModuleInitialized("IS.NOF.UPDATE.UpdateOptions"))
  25. {
  26.     
  27.     /****h* NOF_JavaScript_Library/NOF.UPDATE.UpdateOptions
  28.     *
  29.     * NAME
  30.     *  NOF.UPDATE.UpdateOptions
  31.     *
  32.     * DESCRIPTION
  33.     *
  34.     *
  35.     ****/
  36.     
  37.     /**
  38.     * Constructor    
  39.     */  
  40.     function NOF_UpdateOptions( ) {
  41.         this.__proto__ = NOF_UpdateOptions.prototype;    
  42.         
  43.         this.regEditObj = new NOF.NOFSettings();
  44.     }
  45.     {
  46.         var member = NOF_UpdateOptions.prototype;    
  47.         //member.PATH_SEPARATOR    = "\\"; 
  48.         member.CHECK_ON_LOAD    = 0;
  49.         member.CHECK_ON_CONNECT    = 1;
  50.         
  51.         var method = NOF_UpdateOptions.prototype;        
  52.         /*
  53. boolean isSetAutoUpdate()
  54.     setAutoUpdate(boolean on)
  55.  
  56. int getUpdateFrequency()
  57.     setUpdateFrequency (int frequency)
  58.  
  59. int getEventToCheckForUpdates()
  60.     setEventToCheckForUpdates(int evtId) //NOF.UPDATE.UpdateOptions.CHECK_ON_LOAD or NOF.UPDATE.UpdateOptions.CHECK_ON_CONNECT
  61.         */
  62.         
  63.         /**
  64.         * Determine if Fusion should automatically check for updates.
  65.         * 
  66.         * @return 
  67.         **/
  68.         method.isSetAutoUpdate    = function () { 
  69.             var cu    = this.regEditObj.get('Settings\\CheckUpdate', NOF.NOFSettings.INT_VALUE, true);
  70.             return !cu;
  71.         }        
  72.         
  73.         /**
  74.         * Set Fusion to check for updates automatically or manual.
  75.         * 
  76.         * @param on if true then the autoupdate mode will be used
  77.         **/
  78.         method.setAutoUpdate    = function (/*boolean*/ on) { 
  79.             
  80.         }        
  81.         
  82.  
  83.         /**
  84.         * Get the frequency of checking for updates.
  85.         * 
  86.         * @return 0 for Weekly, 1 for Daily, 2 for Monthly
  87.         **/
  88.         method.getUpdateFrequency    = function () { 
  89.             var uf    = this.regEditObj.get('Settings\\UpdateFrequency', NOF.NOFSettings.INT_VALUE, true);
  90.             if (uf == null) {
  91.                 uf = 0;
  92.             }
  93.             return uf;
  94.         }        
  95.         /**
  96.         * Set the frequency of checking for updates.
  97.         * 
  98.         * @param frequency
  99.         **/
  100.         method.setUpdateFrequency    = function (/*int*/ frequency) { 
  101.             
  102.         }        
  103.         
  104.  
  105.         /**
  106.         * Get the event when Fusion should automatically check for updates.
  107.         * 
  108.         * @return NOF.UPDATE.UpdateOptions.CHECK_ON_LOAD (CHECK_ON_CONNECT deprecated)
  109.         **/
  110.         method.getEventToCheckForUpdates    = function () { 
  111.             return NOF.UPDATE.UpdateOptions.CHECK_ON_LOAD;
  112.         }        
  113.         
  114.         /**
  115.         * Set the event when Fusion should check for updates (if automatically mode is on).
  116.         * 
  117.         * @param evtId - NOF.UPDATE.UpdateOptions.CHECK_ON_LOAD - when Fusion starts or 
  118.         * NOF.UPDATE.UpdateOptions.CHECK_ON_CONNECT - when Fusion connects to the Internet
  119.         **/
  120.         method.setEventToCheckForUpdates    = function (/*int*/ evtId) { 
  121.             
  122.         }        
  123.         
  124.     }    
  125.     
  126.     NOF.UPDATE.__proto__.UpdateOptions = new NOF_UpdateOptions();    
  127. }